package com.mrogrape.notepad.ui;

import javax.swing.JCheckBoxMenuItem;
import javax.swing.JMenu;

import com.mrogrape.notepad.activity.action.MainFrameActionFactory;
import com.mrogrape.notepad.resource.Settings;

public class ToolbarMenu extends JMenu{

	/** serialVersionUID */
	private static final long serialVersionUID = 1L;

	public ToolbarMenu(){
		
		this.initComponents();
	}
	
	private void initComponents(){
		
		this.setText("Toolbar");

		this.toggleToolbarVisibleMenuItem = new JCheckBoxMenuItem(MainFrameActionFactory.fetchToggleToolbarVisibleMenuItemAction());
		this.toggleToolbarVisibleMenuItem.setSelected(Settings.getSettings().isShowToolbar());
		this.add(this.toggleToolbarVisibleMenuItem);
	}
	
	private JCheckBoxMenuItem toggleToolbarVisibleMenuItem = null;
	
}
